using Config;
using MoonFramework.Buff;
using MoonFramework.FSM;
using MoonFramework.Scripts.Tool.System.Setting;
using Tool.Name;

namespace Entity
{
    public abstract class Actor : Entity
    {
        public int Level;
        public BaseFsm<Actor> fsmMachine; //状态机
        public BuffFsm buffFsm; //buff状态机

        public ActorViewController viewController; //面板控制
        
        #region 配置
        public AnimationConfig AnimationConfig { get; protected set; }
        public ActorConfig ActorConfig { get; protected set; }
        #endregion
        #region 属性
        public float WalkSpeed, RunSpeed;
        public float RotationSpeed;
        #endregion

        public virtual void Init(EntityData data, ActorViewController viewController)
        {
            base.Init(data);
            this.viewController = viewController;
            AnimationConfig = ConfigManager.Instance.GetConfig<AnimationConfig>(ConfigName.Animation, 0);
        }
    }
}